---
description: "Reference for Nitric's v0 Node.js library - Creates a new Collection."
---

# Node.js - collection()

Creates a new Collection.

```javascript
import { collection } from '@nitric/sdk'

const profiles = collection('profiles').for('reading', 'writing', 'deleting')
```

## Parameters

<Properties>
  <Property name="name" required type="string">
    The unique name of this Collection within the app. Subsequent calls to
    `collection` with the same name will return the same object.
  </Property>
</Properties>

## Access

All Nitric resources provide access permissions you can use to specify the level of access your code needs to the resource. See here for details about infrastructure [security](/get-started/foundations/infrastructure/security).

### Available permissions:

---

**reading**

This permission allows your code to read and query documents from the collection.

---

**writing**

This permission allows your code to write documents to the collection.

---

**deleting**

This permission allows your code to delete documents from the collection.

---

## Examples

### Create a collection

```javascript
import { collection } from '@nitric/sdk'

const profiles = collection('profiles').for('reading', 'writing', 'deleting')
```
